﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="result.aspx.cs" Inherits="YANFBApp.result" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <%
        if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 1 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 4)
        {
            Response.Write("<title>Điểm yếu lớn nhất của bạn khi yêu</title>");
        }
        else if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 5 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 7)
        {
            Response.Write("<title>Trắc nghiệm: đo độ \"sống ảo\" của bạn</title>");
        }
    %>
	<meta http-equiv="REFRESH" content="1800" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="content-language" content="vi" />
    <meta charset="utf-8" />

    <meta content="INDEX,FOLLOW" name="robots" />
    <meta content="global" name="distribution" />
    <meta content="general" name="rating" />
    <meta content="1 days" name="revisit-after" />
    <meta name="format-detection" content="telephone=no" />

    <%
        if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 1 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 4)
        {
            Response.Write("<meta property=\"fb:app_id\" content=\"1420259911602083\" />");
            Response.Write("<meta property=\"og:type\" content=\"article\" />");
            
            Response.Write("<meta property=\"og:title\" itemprop=\"headline\" name=\"title\" content=\"Điểm yếu lớn nhất của bạn khi yêu\" />");
            Response.Write("<meta property=\"og:site_name\" content='YAN Bí kíp yêu' />");
            Response.Write("<meta property=\"og:url\" itemprop=\"url\" content=\"" + strLink + "\" />");
            Response.Write("<meta property=\"og:description\" itemprop=\"description\" name=\"description\" content=\"" + strTitle + "\" />");

            Response.Write("<meta property=\"og:image\" content=\"https://fbapp.yan.vn/images/" + (Request.Params["resultid"] == null ? "1" : Request.Params["resultid"].ToString()) + ".jpg\" />");
            Response.Write("<meta property=\"article:publisher\" content=\"https://www.facebook.com/YANBiKipYeu\" />");
            Response.Write("<meta property=\"article:author\" content=\"https://www.facebook.com/YANBiKipYeu\" />");
            Response.Write("<link rel=\"image_src\" href=\"https://fbapp.yan.vn/images/" + (Request.Params["resultid"] == null ? "1" : Request.Params["resultid"].ToString()) + ".jpg\" />");

            Response.Write("<meta name=\"keywords\" content=\"YAN bí kíp yêu, " + strTitle + "\" />");
            Response.Write("<meta name=\"description\" content=\"YAN bí kíp yêu, " + strTitle + "\" />");
        }
        else if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 5 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 7)
        {
            Response.Write("<meta property=\"fb:app_id\" content=\"151010854934254\" />");
            Response.Write("<meta property=\"og:type\" content=\"article\" />");
            
            Response.Write("<meta property=\"og:title\" itemprop=\"headline\" name=\"title\" content=\"Trắc nghiệm: đo độ 'sống ảo' của bạn\" />");
            Response.Write("<meta property=\"og:site_name\" content='YAN News' />");
            Response.Write("<meta property=\"og:url\" itemprop=\"url\" content=\"" + strLink + "\" />");
            Response.Write("<meta property=\"og:description\" itemprop=\"description\" name=\"description\" content=\"" + strTitle + "\" />");

            Response.Write("<meta property=\"og:image\" content=\"https://fbapp.yan.vn/images/" + (Request.Params["resultid"] == null ? "1" : Request.Params["resultid"].ToString()) + ".jpg\" />");
            Response.Write("<meta property=\"article:publisher\" content=\"https://www.facebook.com/YANNews\" />");
            Response.Write("<meta property=\"article:author\" content=\"https://www.facebook.com/YANNews\" />");
            Response.Write("<link rel=\"image_src\" href=\"https://fbapp.yan.vn/images/" + (Request.Params["resultid"] == null ? "1" : Request.Params["resultid"].ToString()) + ".jpg\" />");

            Response.Write("<meta name=\"keywords\" content=\"YAN News, " + strTitle + "\" />");
            Response.Write("<meta name=\"description\" content=\"YAN News, " + strTitle + "\" />");
        }
    %>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <img src="https://fbapp.yan.vn/images/<%= (Request.Params["resultid"] == null ? "1" : Request.Params["resultid"].ToString()) %>.jpg" />
        </div>
    </form>
    <%
        if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 1 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 4)
        {
    %>
    <script>
        if (window.location.search.indexOf("fb_action_ids") > 0 && window.location.search.indexOf("fb_action_types")) {
            window.location = "https://apps.facebook.com/yanbikipyeu/";
        }
    </script>
    <%
        }
        else if (Convert.ToInt32(Request.Params["resultid"].ToString()) >= 5 && Convert.ToInt32(Request.Params["resultid"].ToString()) <= 7)
        {
    %>
    <script>
        if (window.location.search.indexOf("fb_action_ids") > 0 && window.location.search.indexOf("fb_action_types")) {
            window.location = "https://apps.facebook.com/151010854934254/";
        }
    </script>
    <%
        }
    %>
</body>
</html>
